import http from '../plugins/http';
interface IWBDataModal {
    indexes: string;
    text: string;
    href: string;
    hot: string;
    type: string;
};

interface IZHDataModal {
    indexes: string;
    title: string;
    content: string;
    heat: string;
    href: string;
};

interface IBDDataModal {
    indexes: string;
    href: string;
    title: string;
    content: string;
    heat: string;
    imgSrc: string;
}

interface IWBResultModal {
    code: number;
    data: IWBDataModal[];
    msg: string;
}

interface IZHResultModal {
    code: number;
    data: IZHDataModal[];
    msg: string;
}

interface IBDResultModal {
    code: number;
    data: IBDDataModal[];
    msg: string;
}

export const getWBHotNews = async () => {
    const result: IWBResultModal = await http.get('/api/topSearch/getWB');
    return result;
}

export const getZHHotNews = async () => {
    const result: IZHResultModal = await http.get('/api/topSearch/getZH');
    return result;
}

export const getBDHotNews = async () => {
    const result: IBDResultModal = await http.get('/api/topSearch/getBD');
    return result;
}